package com.jdls;

import com.alibaba.druid.pool.DruidDataSource;
import com.jdls.config.Config;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author 嘉德罗斯
 * @date 2021/9/10
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext ac = new AnnotationConfigApplicationContext(Config.class);
        //BookDao dao = (BookDao) ac.getBean("Dao");
        //dao.show();

        //BookService book = (BookService) ac.getBean("book");
        //book.show();
        DruidDataSource druid =ac.getBean(DruidDataSource.class);
        System.out.println(druid);
    }
}
